#coding=utf-8
import requests,json,urllib

headers = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
           'Accept - Encoding': 'gzip, deflate','Accept-Language': 'zh-CN,zh;q=0.9',
           'User - Agent': 'Mozilla / 5.0(Windows NT 6.1;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 71.0.3578.98Safari / 537.36',
           'Cookie': 'JSESSIONID = FACE35EE920992A5D1AC8CEF6F2BF909',
           'Referer': 'http: // community - platform - api - test.gdgyun.com / swagger - ui.html',
           'Authorization': 'Basic YWRtaW46MTIzNDU2','Upgrade-Insecure-Requests': '1',
           'Connection': 'keep - alive','Host': 'community-platform-api-test.gdgyun.com'}
s = requests.session()
api_index = s.get('http://community-platform-api-test.gdgyun.com/v2/api-docs',headers=headers)
print api_index.text
path = api_index.json()["swagger"]
print path